/*
 * Created on 22 mars 2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package communication;

import java.io.Serializable;

import kernel.Simulator;


/**
 * @author Equipe SimPack 2004
 * Ends the communication
 */
public class EndOfCommunicationAction extends Action implements Serializable{

	/**
	 * 
	 * @uml.property name="cc"
	 * @uml.associationEnd multiplicity="(1 1)"
	 */
	private CurrentCommunication cc;

	/**
	 * Build a new EndOfCommunicationAction
	 * @param com the communication that is to be ended
	 */
	public EndOfCommunicationAction(CurrentCommunication com,Simulator sim) {
		super(null,sim.getTime() ,0,sim);
		cc=com;
	}

	public void executeAction() {
	//repositionner ts les mobiles a wait ???
		properlyEnded=true;
		cc.setEnded(true);
	
	}
	public String toString(){
			return "EndofComAct";
		}

	public void makeProperlyEnd() {
	}

	
}
